Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front-end perms and back-end content for exceptions of owners #597

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

AmirHamzahMirza
Copy link
Collaborator

Nothing to really discuss besides what is already defined

JIRA: link to jira ticket

Context:

Primarily aimed at abstraction of DOM components via user roles to fit business logic use cases, such as someone with the OWNER role not having access to bills or visit information that contains other "OWNERs" info. Also to implement extensions and reductions of errors available in the browser console when navigating the front-end.

Changes

  • Each role has changes to the front end where access to certain endpoints or DOM properties is prohibited.
  • Error regarding vet-list has been resolved with a minor code tweak.
  • 404 error for "owner details"/"edit account" link when loaded as anyone except an OWNER now does not return an error.
  • Added some exception handling logic regarding the main 404 error

Before and After UI (Required for UI-impacting PRs)

Owner Nav Before/After
ownerNavBefore

ownerNavAfter

Vet-list before/After
vetlistErrorBefore

vetlistErrorAfter

Vet nav before/after
vetNavBefore

vetNavAfter

Dev notes (Optional)

  • Error handling within the GlobalExceptionHandler class causes issues for the API-Gateway service within docker.
  • It has been found that to optimally remove 404 errors via the bills list, the ownerIDs need to assigned correctly instead of different fields entirely.

Copy link
Collaborator

@cubajosh cubajosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work man, the exception handling looks good.

@github-actions
Copy link

github-actions bot commented Oct 24, 2023

Qodana for JVM

405 new problems were found

Inspection name Severity Problems
Unused import 🔶 Warning 116
Redundant character escape 🔶 Warning 85
Dangling Javadoc comment 🔶 Warning 15
Integer multiplication or shift implicitly cast to 'long' 🔶 Warning 10
Invalid YAML configuration 🔶 Warning 9
Field can be local 🔶 Warning 7
AutoCloseable used without 'try'-with-resources 🔶 Warning 6
Redundant 'Collection.addAll()' call 🔶 Warning 6
Optional.get() is called without isPresent() check 🔶 Warning 6
Redundant local variable 🔶 Warning 6
Default annotation parameter value 🔶 Warning 5
Nullability and data flow problems 🔶 Warning 4
Deprecated API usage 🔶 Warning 4
Link specified as plain text 🔶 Warning 4
@NotNull/@Nullable problems 🔶 Warning 4
Spring Data repository method parameters errors 🔶 Warning 4
Unused assignment 🔶 Warning 4
Possibly blocking call in non-blocking context 🔶 Warning 3
Field may be 'final' 🔶 Warning 3
Lombok @Getter may be used 🔶 Warning 3
Call to 'printStackTrace()' 🔶 Warning 3
Non-final field in 'enum' 🔶 Warning 2
'Optional' used as field or parameter type 🔶 Warning 2
Unused publisher 🔶 Warning 2
Redundant type cast 🔶 Warning 2
Redundant 'close()' 🔶 Warning 2
Calling 'subscribe' in "reactive" methods 🔶 Warning 1
Mismatch in @PathVariable declarations and usages 🔶 Warning 1
Begin or end anchor in unexpected position 🔶 Warning 1
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 1
Unchecked warning 🔶 Warning 1
Unnecessary call to 'toString()' 🔶 Warning 1
Commented out code ◽️ Notice 35
Duplicated code fragment ◽️ Notice 23
Non recommended 'field' injections ◽️ Notice 19
Constant values ◽️ Notice 2
Mismatch in @PathVariable declarations and usages ◽️ Notice 1
Throw statement in Reactive operator ◽️ Notice 1
Regular expression can be simplified ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Copy link
Collaborator

@PaulJ2001 PaulJ2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks well-structured, good work on your exception handling logic.

@AmirHamzahMirza AmirHamzahMirza merged commit b8249e8 into main Oct 24, 2023
3 checks passed
@AmirHamzahMirza AmirHamzahMirza deleted the feat/AUTH-CPC-852-Error_Handling branch October 24, 2023 15:01
DylanBrass added a commit that referenced this pull request Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants